<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<div class="container">
    <h1>Editar Publicacion</h1><br/><br/>
    <form:form action="edit" method="post" commandName="publicacion" cssClass="form-horizontal">
        <div class="row">
            <form:hidden path="id"></form:hidden>
            <div class="control-group">
                <label>Titulo:</label>
                <div class="controls">
                    <form:input path="titulo"></form:input>
                    <form:errors path="titulo" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Categoria:</label>
                <div class="controls">
                    <select name="categoria">
                        <option value="1">1</option> 
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                    </select>
                </div>
            </div>
           <div class="control-group">
                <label>SubCategoria:</label>
                <div class="controls">
                    <select name="subcategoria">
                        <option value="1">1</option> 
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                    </select>
                </div>
            </div>
                
            <div class="control-group">
                <label>Descripcion:</label>
                <div class="controls">
                    <form:input path="descr"></form:input>
                    <form:errors path="descr" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Cantidad:</label>
                <div class="controls">
                    <form:input path="cantidad"></form:input>
                    <form:errors path="cantidad" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Precio:</label>
                <div class="controls">
                    <form:input path="precio"></form:input>
                    <form:errors path="precio" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Fecha de Creacion:</label>
                <div class="controls">
                    <form:input path="fechacre"></form:input>
                    <form:errors path="fechacre" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Duracion:</label>
                <div class="controls">
                    <form:input path="duracion"></form:input>
                    <form:errors path="duracion" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Fecha de Fin:</label>
                <div class="controls">
                    <form:input path="fechafin"></form:input>
                    <form:errors path="fechafin" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Foto1:</label>
                <div class="controls">
                    <form:input path="foto1"></form:input>
                    <form:errors path="foto1" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Foto2:</label>
                <div class="controls">
                    <form:input path="foto2"></form:input>
                    <form:errors path="foto2" cssstyle="color:red"></form:errors>
                </div>
            </div>
            <div class="control-group">
                <label>Foto3:</label>
                <div class="controls">
                    <form:input path="foto3"></form:input>
                    <form:errors path="foto3" cssstyle="color:red"></form:errors>
                </div>
            </div>
                
        </div>
        <div class="actions" style="margin-left: 160px;">
            <input name="" value="Editar" type="submit" class="btn btn-primary">
            <a style="margin-left: 5px;" href="<c:url value='/pages/publicaciones/index'/>">Cancelar</a>
        </div>
    </form:form>
</div>

